from typing import List, Callable, Tuple

from PySide6.QtCore import QPoint
from PySide6.QtWidgets import QWidget, QVBoxLayout, QPushButton


class BtnMenu(QWidget):
    def __init__(self, callbacks: List[Tuple[str, Callable]], pos: QPoint):
        super().__init__()
        self.setWindowTitle('')
        self.move(pos)

        layout = QVBoxLayout(self)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.setSpacing(0)

        for desc, callback in callbacks:
            btn = QPushButton(desc)
            btn.setFixedHeight(30)
            btn.clicked.connect(callback)
            layout.addWidget(btn)
